home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / networke / civ-0.000 / civ-0 / civ-0.3 / src / X11Screen.h < prev   
C/C++ Source or Header  |  1995-03-11  |  1KB  |  73 lines

  1. #ifndef _X11_SCREEN
  2. #define _X11_SCREEN
  3.  
  4. #include "graph.h"
  5.  
  6. #include <X11/Xlib.h>
  7. #include <xview/xview.h>
  8. #include <xview/panel.h>
  9. #include <xview/font.h>
  10. #include <X11/xpm.h>
  11.  
  12. class MsgQ;
  13.  
  14. class X11Screen : public Graphics
  15. {
  16. public:
  17.   X11Screen(int argc, char **argv, void (*key)(int, int, int, char *));
  18.   virtual~ X11Screen();
  19.  
  20.   int AllocColor(char *name);
  21.  
  22.   void Refresh();
  23.  
  24.   void DisplayMessage(char *str, int color);
  25.  
  26.   void WriteStr(int x, int y, char *str, int color);
  27.   void WriteChar(int x, int y, int ch, int color);
  28.  
  29.   void Clear();
  30.  
  31.   void FillRect(int x, int y, int width, int ht, int col);
  32.  
  33.   void Rect(int x, int y, int width, int ht, int col);
  34.  
  35.   void BitBlt(int sx, int sy, int w, int h, int dx, int dy);
  36.  
  37.   long CompilePixmap(char **pixmap);
  38.  
  39.   void FreePixmap(long handle);
  40.  
  41.   void DrawPixmap(int xc, int yc, long handle);
  42.  
  43.   void GetPixmapInfo(long handle, int &w, int &h);
  44.  
  45.   void StartTimer(int which, int milli, HandlerFunc func);
  46.   void StopTimer(int which);
  47.  
  48.   int MainLoop();
  49.  
  50.   void AddReadNotify(int fd, void (*func)(MsgQ *, int, int), int info = 0,
  51.              int q = 1);
  52.  
  53.   void CreateChoiceFrame(char *mesg, List<charp> choices);
  54.  
  55.   void MessageBox(char *mesg);
  56.  
  57. private:
  58.   struct PixmapInfo {
  59.     Pixmap pixmap;
  60.     Pixmap mask;
  61.     int w, h;
  62.   };
  63.  
  64.   Display *dpy;
  65.   GC gc;
  66.   Window mapWin;
  67.   Panel_item accept;
  68.   Panel_item mesg;
  69.   Colormap colormap;
  70. };
  71.  
  72. #endif
  73.